import { defineStore } from 'pinia'
import { computed, ref } from 'vue'
import { routes } from '@/router/router'

export const useSysStore = defineStore('sys', () => {
  const curSys = ref('')

  const curSysRoutes = computed(() => {
    switch (curSys.value) {
      case '故障演化':
        return routes[0].children
      case '健康评估':
        return routes[1].children
      case '健康监测':
        return routes[2].children
      default:
        return routes
    }
  })

  return { curSys, curSysRoutes }
})
